package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.tb.tbtokennew.TbTokenNewQuery;
import com.uzai.console.entity.TbTokenNew;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface TbTokenNewMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(TbTokenNew record);

    int insertSelective(TbTokenNew record);

    TbTokenNew selectById(@Param("id") Long id, @Param("merId") Long merId);

    TbTokenNew selectByUserId(Long userId);

    int update(TbTokenNew record);

    int updateSelective(TbTokenNew record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<TbTokenNew> findByList(Page<TbTokenNew> page, @Param("query") TbTokenNewQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<TbTokenNew> findByList(@Param("query") TbTokenNewQuery query);

}